package com.cyan.note.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 店铺配置实体类
 * 对应数据库表: shop_settings
 * 
 * @author ZhangzhenYu
 * @since 2025-01-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ShopSetting extends BaseEntity {

    /**
     * 所属店铺ID
     */
    private Long shopId;

    /**
     * 配置分类
     */
    private String settingCategory;

    /**
     * 配置键
     */
    private String settingKey;

    /**
     * 配置值
     */
    private String settingValue;

    /**
     * 配置类型
     */
    private String settingType;

    /**
     * 配置说明
     */
    private String description;

    /**
     * 是否系统配置
     */
    private Boolean isSystem;

    /**
     * 创建人ID
     */
    private Long createdBy;

    /**
     * 更新人ID
     */
    private Long updatedBy;

    // 常量定义
    public static class SettingCategory {
        public static final String ORDER = "order";
        public static final String FINANCE = "finance";
        public static final String CUSTOMER = "customer";
        public static final String WORKER = "worker";
        public static final String SYSTEM = "system";
    }

    public static class SettingType {
        public static final String STRING = "string";
        public static final String NUMBER = "number";
        public static final String BOOLEAN = "boolean";
        public static final String JSON = "json";
    }

    // 常用配置键
    public static class SettingKey {
        // 订单相关
        public static final String TIMEOUT_REMINDER_MINUTES = "timeout_reminder_minutes";
        public static final String AUTO_CANCEL_MINUTES = "auto_cancel_minutes";
        public static final String MIN_DURATION_HOURS = "min_duration_hours";
        public static final String MAX_DURATION_HOURS = "max_duration_hours";
        
        // 财务相关
        public static final String DEFAULT_COMMISSION_RATE = "default_commission_rate";
        
        // 客户相关
        public static final String LEVEL_UPGRADE_AMOUNT = "level_upgrade_amount";
        
        // 打手相关
        public static final String MAX_CONCURRENT_ORDERS = "max_concurrent_orders";
    }
}